/*
 * @Description: 表格列配置
 * @Author: HuiSir<https://gitee.com/huisir001>
 * @Date: 2021-11-05 11:41:30
 * @LastEditTime: 2025-08-15 12:30:48
 */
import { defineTableCols } from "@/components/TablePage/predefined";
import { tableColsMixin } from "@/helpers/optionsMixin";

export default defineTableCols(() => [
  {
    label: "序号",
    minWidth: "50",
    type: "index",
    fixed: "left",
  },
  {
    label: "角色名称",
    minWidth: "100",
    prop: "name",
    fixed: "left",
    showOverflowTooltip: true,
  },
  {
    label: "角色编码",
    prop: "code",
    minWidth: "120",
    showOverflowTooltip: true,
  },
  {
    label: "角色描述",
    prop: "description",
    minWidth: "140",
    showOverflowTooltip: true,
    formatter(_row, _column, cellValue) {
      return cellValue || "-";
    },
  },
  ...tableColsMixin,
  {
    label: "操作",
    fixed: "right",
    minWidth: "160",
    useRowBtns: true,
  },
]);
